package cn.kgc.ssm.web.handlers;

import cn.kgc.ssm.web.response.ResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 课工场
 * @date 2024/7/29
 * @description   全局异常处理类
 */
@RestControllerAdvice
public class GlobalExceptionHandler {


    @ExceptionHandler(Exception.class)
    public ResponseResult  otherException(Exception e){

        e.printStackTrace();

        return ResponseResult.error();
    }
}
